[aGrUM] updating CMakeLists.txt for apps/aGrUM

parent 05434745
......@@ -4,13 +4,23 @@ cmake_minimum_required(VERSION 2.8)
# -DCMAKE_BUILD_TYPE=DEBUG|RELEASE
# -G "MinGW Makefiles"
# cmake -DCMAKE_BUILD_TYPE=DEBUG
# or
# cmake -DCMAKE_BUILD_TYPE=RELEASE
# RELEASE is the default option (thanks to the next 3 lines)
if( CMAKE_BUILD_TYPE )
message(STATUS "version : '${CMAKE_BUILD_TYPE}'")
else ()
set( CMAKE_BUILD_TYPE RELEASE)
message(STATUS "default version : ${CMAKE_BUILD_TYPE}")
endif()
include("${HOWTO_BUILD_SIMPLE_BN_SOURCE_DIR}/../config.txt")
if (NOT DEFINED aGrUM_DIR)
set(aGrUM_DIR "${AGRUM_INSTALLATION_DIRECTORY}/lib/cmake/aGrUM/")
endif ()
find_package(aGrUM NO_MODULE)
if (aGrUM_FOUND)
......@@ -19,21 +29,15 @@ else (aGrUM_FOUND)
message(FATAL_ERROR "Please install aGrUM")
endif (aGrUM_FOUND)
# cmake -DCMAKE_BUILD_TYPE=DEBUG
# or
# cmake -DCMAKE_BUILD_TYPE=RELEASE
# RELEASE is the default option (thanks to the next 3 lines)
if( CMAKE_BUILD_TYPE )
message(STATUS "version : '${CMAKE_BUILD_TYPE}'")
else ()
set( CMAKE_BUILD_TYPE RELEASE)
message(STATUS "default version : ${CMAKE_BUILD_TYPE}")
endif()
file(GLOB HOWTO_BUILD_SIMPLE_BN_SOURCE ${HOWTO_BUILD_SIMPLE_BN_SOURCE_DIR}/*.cpp)
file(GLOB HOWTO_BUILD_SIMPLE_BN_INCLUDE ${HOWTO_BUILD_SIMPLE_BN_SOURCE_DIR}/*.h)
add_executable (buildSimpleBN ${HOWTO_BUILD_SIMPLE_BN_SOURCE})
target_link_libraries(buildSimpleBN ${AGRUM_LIBRARIES_${CMAKE_BUILD_TYPE}})
if (${CMAKE_BUILD_TYPE} STREQUAL "RELEASE") # release : act install release
target_link_libraries(buildSimpleBN agrum)
else() # debug : act install debug
target_link_libraries(buildSimpleBN agrum-dbg)
endif()
install (TARGETS buildSimpleBN DESTINATION bin)
project(EXAMPLE)
cmake_minimum_required(VERSION 2.8)
# classical options
# -DCMAKE_BUILD_TYPE=DEBUG|RELEASE
# -G "MinGW Makefiles"
# cmake -DCMAKE_BUILD_TYPE=DEBUG
# or
# cmake -DCMAKE_BUILD_TYPE=RELEASE
# RELEASE is the default option (thanks to the next lines)
if( CMAKE_BUILD_TYPE )
message(STATUS "version : '${CMAKE_BUILD_TYPE}'")
else ()
set( CMAKE_BUILD_TYPE RELEASE)
message(STATUS "default version : ${CMAKE_BUILD_TYPE}")
endif()
include("${EXAMPLE_SOURCE_DIR}/../config.txt")
if (NOT DEFINED aGrUM_DIR)
......@@ -14,21 +28,17 @@ else (aGrUM_FOUND)
message(FATAL_ERROR "Please install aGrUM")
endif (aGrUM_FOUND)
# cmake -DCMAKE_BUILD_TYPE=DEBUG
# or
# cmake -DCMAKE_BUILD_TYPE=RELEASE
# RELEASE is the default option (thanks to the next 3 lines)
if( CMAKE_BUILD_TYPE )
message(STATUS "version : '${CMAKE_BUILD_TYPE}'")
else ()
set( CMAKE_BUILD_TYPE RELEASE)
message(STATUS "default version : ${CMAKE_BUILD_TYPE}")
endif()
file(GLOB EXAMPLE_SOURCE ${EXAMPLE_SOURCE_DIR}/*.cpp)
file(GLOB EXAMPLE_INCLUDE ${EXAMPLE_SOURCE_DIR}/*.h)
add_executable (example ${EXAMPLE_SOURCE})
target_link_libraries(example ${AGRUM_LIBRARIES})
install (TARGETS example DESTINATION bin)
add_executable (crossvalid ${EXAMPLE_SOURCE})
if (${CMAKE_BUILD_TYPE} STREQUAL "RELEASE") # release : act install release
target_link_libraries(crossvalid agrum)
else() # debug : act install debug
target_link_libraries(crossvalid agrum-dbg)
endif()
install (TARGETS crossvalid DESTINATION bin)
project(EXAMPLE)
cmake_minimum_required(VERSION 2.8)
# classical options
# -DCMAKE_BUILD_TYPE=DEBUG|RELEASE
# -G "MinGW Makefiles"
# cmake -DCMAKE_BUILD_TYPE=DEBUG
# or
# cmake -DCMAKE_BUILD_TYPE=RELEASE
# RELEASE is the default option (thanks to the next lines)
if( CMAKE_BUILD_TYPE )
message(STATUS "version : '${CMAKE_BUILD_TYPE}'")
else ()
set( CMAKE_BUILD_TYPE RELEASE)
message(STATUS "default version : ${CMAKE_BUILD_TYPE}")
endif()
include("${EXAMPLE_SOURCE_DIR}/../config.txt")
if (NOT DEFINED aGrUM_DIR)
......@@ -14,21 +29,15 @@ else (aGrUM_FOUND)
message(FATAL_ERROR "Please install aGrUM")
endif (aGrUM_FOUND)
# cmake -DCMAKE_BUILD_TYPE=DEBUG
# or
# cmake -DCMAKE_BUILD_TYPE=RELEASE
# RELEASE is the default option (thanks to the next 3 lines)
if( CMAKE_BUILD_TYPE )
message(STATUS "version : '${CMAKE_BUILD_TYPE}'")
else ()
set( CMAKE_BUILD_TYPE RELEASE)
message(STATUS "default version : ${CMAKE_BUILD_TYPE}")
endif()
file(GLOB EXAMPLE_SOURCE ${EXAMPLE_SOURCE_DIR}/*.cpp)
file(GLOB EXAMPLE_INCLUDE ${EXAMPLE_SOURCE_DIR}/*.h)
add_executable (example ${EXAMPLE_SOURCE})
target_link_libraries(example ${AGRUM_LIBRARIES})
if (${CMAKE_BUILD_TYPE} STREQUAL "RELEASE") # release : act install release
target_link_libraries(example agrum)
else() # debug : act install debug
target_link_libraries(example agrum-dbg)
endif()
install (TARGETS example DESTINATION bin)
......@@ -4,13 +4,22 @@ cmake_minimum_required(VERSION 2.8)
# -DCMAKE_BUILD_TYPE=DEBUG|RELEASE
# -G "MinGW Makefiles"
# cmake -DCMAKE_BUILD_TYPE=DEBUG
# or
# cmake -DCMAKE_BUILD_TYPE=RELEASE
# RELEASE is the default option (thanks to the next 3 lines)
if( CMAKE_BUILD_TYPE )
message(STATUS "version : '${CMAKE_BUILD_TYPE}'")
else ()
set( CMAKE_BUILD_TYPE RELEASE)
message(STATUS "default version : ${CMAKE_BUILD_TYPE}")
endif()
include("${OPERATIONS_WITH_POTENTIAL_SOURCE_DIR}/../config.txt")
if (NOT DEFINED aGrUM_DIR)
set(aGrUM_DIR "${AGRUM_INSTALLATION_DIRECTORY}/lib/cmake/aGrUM/")
endif ()
find_package(aGrUM NO_MODULE)
if (aGrUM_FOUND)
......@@ -19,21 +28,15 @@ else (aGrUM_FOUND)
message(FATAL_ERROR "Please install aGrUM")
endif (aGrUM_FOUND)
# cmake -DCMAKE_BUILD_TYPE=DEBUG
# or
# cmake -DCMAKE_BUILD_TYPE=RELEASE
# RELEASE is the default option (thanks to the next 3 lines)
if( CMAKE_BUILD_TYPE )
message(STATUS "version : '${CMAKE_BUILD_TYPE}'")
else ()
set( CMAKE_BUILD_TYPE RELEASE)
message(STATUS "default version : ${CMAKE_BUILD_TYPE}")
endif()
file(GLOB OPERATIONS_WITH_POTENTIAL_SOURCE ${OPERATIONS_WITH_POTENTIAL_SOURCE_DIR}/*.cpp)
file(GLOB OPERATIONS_WITH_POTENTIAL_INCLUDE ${OPERATIONS_WITH_POTENTIAL_SOURCE_DIR}/*.h)
add_executable (operationsWithPotentials ${OPERATIONS_WITH_POTENTIAL_SOURCE})
target_link_libraries(operationsWithPotentials ${AGRUM_LIBRARIES_${CMAKE_BUILD_TYPE}})
install (TARGETS operationsWithPotentials DESTINATION bin)
add_executable (ops_potentials ${OPERATIONS_WITH_POTENTIAL_SOURCE})
if (${CMAKE_BUILD_TYPE} STREQUAL "RELEASE") # release : act install release
target_link_libraries(ops_potentials agrum)
else() # debug : act install debug
target_link_libraries(ops_potentials agrum-dbg)
endif()
install (TARGETS ops_potentials DESTINATION bin)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment