Skip to content

Commit

Permalink
fix test_package build on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
phbasler committed Jul 15, 2024
1 parent 52388eb commit 06bab61
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 1 addition & 4 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from conan.tools.system.package_manager import Apt
from conan.errors import ConanInvalidConfiguration
from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout
from conan.tools.files import load, update_conandata
from conan.tools.files import load
from conan.tools.scm import Git
import os, re

Expand Down Expand Up @@ -64,9 +64,6 @@ def requirements(self):
if self.options.UseNLopt:
self.requires("nlopt/2.7.1", transitive_headers=True, transitive_libs=True)

#if self.options.UseLibCMAES and self.settings.os != "Windows":
# self.requires("llvm-openmp/17.0.6", transitive_headers=True)

if self.options.UseLibCMAES:
self.requires("cmaes/0.10.0", transitive_headers=True, transitive_libs=True)

Expand Down
7 changes: 7 additions & 0 deletions test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ project(PackageTest CXX)

find_package(BSMPT CONFIG REQUIRED)

add_compile_options(
$<$<CXX_COMPILER_ID:MSVC>:/permissive->
$<$<AND:$<CXX_COMPILER_ID:MSVC>,$<CONFIG:DEBUG>>:/bigobj>
$<$<CXX_COMPILER_ID:MSVC>:/w44101>
$<$<AND:$<CXX_COMPILER_ID:MSVC>,$<CONFIG:RELEASE>>:/Ox>)

add_executable(example src/example.cpp)
target_link_libraries(example BSMPT::Utility BSMPT::BounceSolution
BSMPT::Models BSMPT::Minimizer)

0 comments on commit 06bab61

Please sign in to comment.