CMake/Tests/CompileDefinitions/CMakeLists.txt
Stephen Kelly f0a1065393 Rename files from main.cpp to more meaningful names.
Because the main file for the dummy-executable and the actual compile
test were both called main.cpp, they were overwriting each other during
in-source builds.
2012-08-22 13:05:07 +02:00

17 lines
500 B
CMake

cmake_minimum_required(VERSION 2.8)
project(CompileDefinitions)
if ("${CMAKE_GENERATOR}" STREQUAL "Visual Studio 6")
add_definitions(-DNO_SPACES_IN_DEFINE_VALUES)
endif()
add_subdirectory(add_definitions_command)
add_subdirectory(target_prop)
add_subdirectory(add_definitions_command_with_target_prop)
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/dummyexecutable.cpp" "int main(int, char **) { return 0; }\n")
add_executable(CompileDefinitions "${CMAKE_CURRENT_BINARY_DIR}/dummyexecutable.cpp")