cmake_minimum_required(VERSION 3.10 FATAL_ERROR) # if CMAKE_BUILD_TYPE is specified use it; otherwise set the default # build type to "RelWithDebInfo" ("-O2 -g" with gcc) prior to calling # project() if(DEFINED CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "Choose build type") else(DEFINED CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose build type") endif(DEFINED CMAKE_BUILD_TYPE) project(vorosweep CXX) add_subdirectory(libboard) include_directories(${LibBoard_SOURCE_DIR}/include) set(CMAKE_CXX_FLAGS "-Wall -std=c++0x") # c11 list(APPEND LINK_LIBRARIES board pthread sqlite3) # Setup testing #enable_testing() #find_package(GTest) #include_directories(${GTEST_INCLUDE_DIR}) #file(GLOB SRC /usr/src/gtest/src/*.c* ) #set(GTEST_SRC ${SRC}) #include_directories(/usr/src/gtest/) include_directories(../geom) set(SRC_VOROSWEEP grid.cpp sweepobject.cpp generator.cpp vorosweep.cpp event.cpp border.cpp frontline.cpp handle_newgenerator.cpp handle_newborderedgeswitch.cpp handle_facetswitch.cpp handle_edge_edgecrash.cpp handle_edge_facetcrash.cpp handle_borderedgeswitch.cpp handle_newedgeswitch.cpp handle_edgeswitch.cpp handle_edge_bordercrash.cpp handle_facet_bordercrash.cpp handle_newfacetswitch.cpp next_events.cpp merge.cpp export_vtk.cpp export_graphic.cpp pempek_assert.cpp statistics.cpp domain2d.cpp ) add_executable(vorosweep ${SRC_VOROSWEEP} main_vorosweep.cpp) #add_executable(vorosweep_unit_test ${SRC_VOROSWEEP} database.cpp vorosweep_unit_test.cpp) target_link_libraries(vorosweep ${LINK_LIBRARIES}) #set_target_properties(vorosweep_unit_test PROPERTIES COMPILE_DEFINITIONS "COMPILE_UNIT_TESTS") #target_link_libraries(vorosweep_unit_test ${LINK_LIBRARIES} ${GTEST_LIBRARY} ${GTEST_MAIN_LIBRARY}) #target_link_libraries(vorosweep_unit_test ${LINK_LIBRARIES} ${GTEST_LIBRARY} ${GTEST_MAIN_LIBRARY})