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)