2014-04-02 16:18:32 +04:00
|
|
|
cmake_minimum_required (VERSION 3.0)
|
2012-08-13 21:47:32 +04:00
|
|
|
project(SystemInformation)
|
2004-04-26 21:42:08 +04:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
include_directories("This does not exists")
|
|
|
|
get_directory_property(incl INCLUDE_DIRECTORIES)
|
|
|
|
set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES "${SystemInformation_BINARY_DIR};${SystemInformation_SOURCE_DIR}")
|
2004-04-26 21:42:08 +04:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
message("To prevent CTest from stripping output, you have to display: CTEST_FULL_OUTPUT")
|
2005-02-08 18:13:30 +03:00
|
|
|
|
2004-04-26 21:42:08 +04:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
configure_file(${SystemInformation_SOURCE_DIR}/SystemInformation.in
|
2007-05-11 18:22:20 +04:00
|
|
|
${SystemInformation_BINARY_DIR}/SystemInformation.out)
|
2012-08-13 21:47:32 +04:00
|
|
|
configure_file(${SystemInformation_SOURCE_DIR}/DumpInformation.h.in
|
2007-05-11 18:22:20 +04:00
|
|
|
${SystemInformation_BINARY_DIR}/DumpInformation.h)
|
2012-08-13 21:47:32 +04:00
|
|
|
add_executable(SystemInformation DumpInformation.cxx)
|
2002-11-12 02:07:20 +03:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
macro(FOO args)
|
|
|
|
message("Test macro")
|
2012-08-13 21:50:14 +04:00
|
|
|
endmacro()
|
2003-08-07 02:54:13 +04:00
|
|
|
|
|
|
|
FOO(lala)
|
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/AllVariables.txt "")
|
|
|
|
get_cmake_property(res VARIABLES)
|
|
|
|
foreach(var ${res})
|
|
|
|
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/AllVariables.txt
|
2003-08-04 04:47:44 +04:00
|
|
|
"${var} \"${${var}}\"\n")
|
2012-08-13 21:50:14 +04:00
|
|
|
endforeach()
|
2003-08-04 04:47:44 +04:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/AllCommands.txt "")
|
|
|
|
get_cmake_property(res COMMANDS)
|
|
|
|
foreach(var ${res})
|
|
|
|
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/AllCommands.txt
|
2003-08-04 04:47:44 +04:00
|
|
|
"${var}\n")
|
2012-08-13 21:50:14 +04:00
|
|
|
endforeach()
|
2003-03-06 19:20:26 +03:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/AllMacros.txt "")
|
|
|
|
get_cmake_property(res MACROS)
|
|
|
|
foreach(var ${res})
|
|
|
|
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/AllMacros.txt
|
2003-08-07 02:54:13 +04:00
|
|
|
"${var}\n")
|
2012-08-13 21:50:14 +04:00
|
|
|
endforeach()
|
2003-08-07 02:54:13 +04:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/OtherProperties.txt "")
|
|
|
|
get_directory_property(res INCLUDE_DIRECTORIES)
|
|
|
|
foreach(var ${res})
|
|
|
|
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/OtherProperties.txt
|
2004-04-26 21:42:08 +04:00
|
|
|
"INCLUDE_DIRECTORY: ${var}\n")
|
2012-08-13 21:50:14 +04:00
|
|
|
endforeach()
|
2004-04-26 21:42:08 +04:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
get_directory_property(res LINK_DIRECTORIES)
|
|
|
|
foreach(var ${res})
|
|
|
|
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/OtherProperties.txt
|
2004-04-26 21:42:08 +04:00
|
|
|
"LINK_DIRECTORIES: ${var}\n")
|
2012-08-13 21:50:14 +04:00
|
|
|
endforeach()
|
2004-04-26 21:42:08 +04:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
get_directory_property(res INCLUDE_REGULAR_EXPRESSION)
|
|
|
|
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/OtherProperties.txt
|
2004-04-26 21:42:08 +04:00
|
|
|
"INCLUDE_REGULAR_EXPRESSION: ${res}\n")
|