summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/kwsysPlatformCxxTests.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2003-12-23 16:03:33 (GMT)
committerBrad King <brad.king@kitware.com>2003-12-23 16:03:33 (GMT)
commit032d1d86524fe1748cc7070786655c0ba563ae99 (patch)
tree04a415af48884aab3e549b7bdecd7d5470d54831 /Source/kwsys/kwsysPlatformCxxTests.cmake
parent0bdb092a019c87825a88208d4fdaef77379e3004 (diff)
downloadCMake-032d1d86524fe1748cc7070786655c0ba563ae99.zip
CMake-032d1d86524fe1748cc7070786655c0ba563ae99.tar.gz
CMake-032d1d86524fe1748cc7070786655c0ba563ae99.tar.bz2
ENH: Merging changes from KWSys-IOS-bp to KWSys-IOS-b2t-1-mp to main tree. This introduces separate kwsys_ios and kwsys_stl macros needed to support all platforms.
Diffstat (limited to 'Source/kwsys/kwsysPlatformCxxTests.cmake')
-rw-r--r--Source/kwsys/kwsysPlatformCxxTests.cmake43
1 files changed, 43 insertions, 0 deletions
diff --git a/Source/kwsys/kwsysPlatformCxxTests.cmake b/Source/kwsys/kwsysPlatformCxxTests.cmake
new file mode 100644
index 0000000..faf7633
--- /dev/null
+++ b/Source/kwsys/kwsysPlatformCxxTests.cmake
@@ -0,0 +1,43 @@
+MACRO(KWSYS_PLATFORM_CXX_TEST var description invert)
+ IF("${var}_COMPILED" MATCHES "^${var}_COMPILED$")
+ MESSAGE(STATUS "${description}")
+ TRY_COMPILE(${var}_COMPILED
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}/kwsysPlatformCxxTests.cxx
+ COMPILE_DEFINITIONS -DTEST_${var}
+ OUTPUT_VARIABLE OUTPUT)
+ IF(${var}_COMPILED)
+ FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/CMakeOutput.log
+ "${description} compiled with the following output:\n${OUTPUT}\n\n")
+ ELSE(${var}_COMPILED)
+ FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/CMakeError.log
+ "${description} failed to compile with the following output:\n${OUTPUT}\n\n")
+ ENDIF(${var}_COMPILED)
+ IF(${invert} MATCHES INVERT)
+ IF(${var}_COMPILED)
+ MESSAGE(STATUS "${description} - no")
+ ELSE(${var}_COMPILED)
+ MESSAGE(STATUS "${description} - yes")
+ ENDIF(${var}_COMPILED)
+ ELSE(${invert} MATCHES INVERT)
+ IF(${var}_COMPILED)
+ MESSAGE(STATUS "${description} - yes")
+ ELSE(${var}_COMPILED)
+ MESSAGE(STATUS "${description} - no")
+ ENDIF(${var}_COMPILED)
+ ENDIF(${invert} MATCHES INVERT)
+ ENDIF("${var}_COMPILED" MATCHES "^${var}_COMPILED$")
+ IF(${invert} MATCHES INVERT)
+ IF(${var}_COMPILED)
+ SET(${var} 0)
+ ELSE(${var}_COMPILED)
+ SET(${var} 1)
+ ENDIF(${var}_COMPILED)
+ ELSE(${invert} MATCHES INVERT)
+ IF(${var}_COMPILED)
+ SET(${var} 1)
+ ELSE(${var}_COMPILED)
+ SET(${var} 0)
+ ENDIF(${var}_COMPILED)
+ ENDIF(${invert} MATCHES INVERT)
+ENDMACRO(KWSYS_PLATFORM_CXX_TEST)