COPYING file for distribution
[anf2cnf:anf2cnf.git] / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
2
3 IF(DEFINED CMAKE_BUILD_TYPE)
4     SET(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.")
5 ELSE()
6   SET(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.")
7 ENDIF()
8
9 PROJECT(gea)
10 SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -std=gnu99 -pedantic -Wall -Werror -g -mtune=native")
11 SET(CMAKE_C_FLAGS_DEBUG "-std=gnu99 -pedantic -Wall -Werror -O0 -ggdb")
12 SET(CMAKE_C_FLAGS_RELEASE "-std=gnu99 -pedantic -Wall -fprofile-use -Werror -O3 -g0 -fno-exceptions -DNDEBUG -mtune=native -fomit-frame-pointer")
13
14 FIND_PACKAGE(OpenMP REQUIRED)
15 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
16 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
17
18 #include_directories(${gea_SOURCE_DIR}/MTRand)
19
20 add_library(anf2cnflib libanf2cnf.c libdatastruct.c) 
21
22 add_executable(anf2cnf anf2cnf.c)
23 TARGET_LINK_LIBRARIES(anf2cnf anf2cnflib)
24
25 add_executable(SATsolve SATsolve.c)
26 TARGET_LINK_LIBRARIES(SATsolve anf2cnflib)
27
28 add_executable(looping looping.c)
29 TARGET_LINK_LIBRARIES(looping anf2cnflib)
30
31 add_executable(parseanf parseanf.c)
32 TARGET_LINK_LIBRARIES(parseanf anf2cnflib)
33
34 add_executable(propagate propagate.c)
35 TARGET_LINK_LIBRARIES(propagate anf2cnflib)
36
37 add_executable(GBsolve GBsolve.c)
38 TARGET_LINK_LIBRARIES(GBsolve anf2cnflib)
39
40 add_executable(bestbits bestbits.cpp)
41 TARGET_LINK_LIBRARIES(bestbits anf2cnflib)