Skip to content

Commit

Permalink
- fix for windows build
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@21527 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Marcus Walther committed Jul 16, 2014
1 parent aa070cc commit 3adc024
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions SimulationRuntime/cpp/CMakeLists.txt
Expand Up @@ -9,7 +9,7 @@
#
# Additionally it is possible to link all libraries statically (experimental), therefor -DANALYZATION_MODE=ON musst be passed to cmake
#
# The used defines are stored in the ADDITIONAL_DEFINES variable, which is passed to the ModelicaConfig.inc
# The used defines are stored in the SYSTEM_CFLAGS variable, which is passed to the ModelicaConfig.inc and written in the PrecompiledHeader.cmake



Expand Down Expand Up @@ -126,6 +126,8 @@ find_package(Boost COMPONENTS log log_setup)
SET(Boost_LIBRARIES_TMP ${Boost_LIBRARIES_TMP} ${Boost_LIBRARIES})
find_package(Boost COMPONENTS thread)
SET(Boost_LIBRARIES_TMP ${Boost_LIBRARIES_TMP} ${Boost_LIBRARIES})
find_package(Boost COMPONENTS atomic)
SET(Boost_LIBRARIES_TMP ${Boost_LIBRARIES_TMP} ${Boost_LIBRARIES})
find_package(Threads)

find_package(Boost COMPONENTS filesystem system serialization program_options REQUIRED)
Expand All @@ -138,12 +140,12 @@ ELSE(Boost_LOG_LIBRARY AND Boost_LOG_SETUP_LIBRARY)
message(STATUS "Boost log disabled")
ENDIF(Boost_LOG_LIBRARY AND Boost_LOG_SETUP_LIBRARY)

IF(Boost_THREAD_LIBRARY)
IF(Boost_THREAD_LIBRARY AND Boost_ATOMIC_LIBRARY)
add_definitions(-DUSE_BOOST_THREAD)
message(STATUS "Using boost thread")
ELSE(Boost_THREAD_LIBRARY)
ELSE(Boost_THREAD_LIBRARY AND Boost_ATOMIC_LIBRARY)
message(STATUS "Boost thread disabled")
ENDIF(Boost_THREAD_LIBRARY)
ENDIF(Boost_THREAD_LIBRARY AND Boost_ATOMIC_LIBRARY)

SET(Boost_LIBRARIES ${Boost_LIBRARIES_TMP})
message(STATUS "Boost Libraries")
Expand Down Expand Up @@ -182,8 +184,6 @@ message(STATUS "Lapack Libraries")
message(STATUS ${LAPACK_LIBRARIES})




# Sundials solvers
if(USE_SUNDIALS)

Expand Down Expand Up @@ -233,8 +233,8 @@ if(USE_MICO)
endif()

#Write the defines into the ADDITIONAL_DEFINES variable
GET_DIRECTORY_PROPERTY(ADDITIONAL_DEFINES DEFINITIONS)
message(STATUS "Generated compile definitions: ${ADDITIONAL_DEFINES}")
# GET_DIRECTORY_PROPERTY(ADDITIONAL_DEFINES DEFINITIONS)
# message(STATUS "Generated compile definitions: ${ADDITIONAL_DEFINES}")

link_directories ( ${Boost_LIBRARY_DIRS} )

Expand Down Expand Up @@ -365,8 +365,6 @@ configure_file (
"${PROJECT_BINARY_DIR}/LibrariesConfig.h"
)



if(INSTALL_OMDEV_LIBS)
#if(USE_SUNDIALS)
# install (FILES "${SUNDIALS_NVECSERIAL_LIB}" "${SUNDIALS_IDAS_LIB}" "${SUNDIALS_IDA_LIB}" "${SUNDIALS_CVODES_LIB}" DESTINATION bin)
Expand Down Expand Up @@ -435,4 +433,3 @@ install (FILES "${PROJECT_BINARY_DIR}/LibrariesConfig.h" DESTINATION include/omc
Include/FMU/FMUWrapper.cpp
Include/FMU/FMUWrapper.h)
INSTALL_HEADERS_WITH_DIRECTORY(HS)

0 comments on commit 3adc024

Please sign in to comment.