CMakeLists.txt 607 B

12345678910111213141516
  1. # a simple C only test case
  2. cmake_minimum_required (VERSION 2.6)
  3. project (CompileCommandOutput CXX)
  4. set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
  5. set(CMAKE_DEBUG_POSTFIX "_test_debug_postfix")
  6. if(MAKE_SUPPORTS_SPACES)
  7. set(test1_srcs "file with spaces.cxx")
  8. else()
  9. set(test1_srcs "file_with_underscores.cxx")
  10. endif()
  11. add_library(test1 STATIC ${test1_srcs})
  12. add_library(test2 SHARED "../CompileCommandOutput/relative.cxx")
  13. include_directories(${CompileCommandOutput_SOURCE_DIR}/../../Source)
  14. add_executable(CompileCommandOutput compile_command_output.cxx)
  15. target_link_libraries(CompileCommandOutput test1 test2)