Skip to content

Change how the bin/lib paths are set throughout CMakeLists#653

Draft
ptheywood wants to merge 2 commits intomasterfrom
static-lib-directory
Draft

Change how the bin/lib paths are set throughout CMakeLists#653
ptheywood wants to merge 2 commits intomasterfrom
static-lib-directory

Conversation

@ptheywood
Copy link
Copy Markdown
Member

@ptheywood ptheywood commented Aug 18, 2021

Change how the bin/lib paths are set throughout CMakeLists.

Includes overwriting per target output properties in some cases (gtest).

This should resovle #601, and shouldn't break standalone repos, but they would likely benefit from the minor change to their CMakes.

Todo

@ptheywood
Copy link
Copy Markdown
Member Author

On Windows this has led _pyflamegpu.pyd to be placed in /bin/Release/, as it's essentailly a .dll. This is probably not the correct location?

Each example is producing a .lib and .exp file which are placed in lib/Release I don't think these are something we are intentionally producing? I was only epxecting to see tinyxml2.lib, gtest.lib, pyflamegpu.lib (and maybe .exp) and `python/ in there.

From the output of cmake --build it does state that it's creating a library and an object:

 main.obj
     Creating library C:/Users/ptheywood/code/flamegpu/FLAMEGPU2/build/lib/Release/ensemble.lib and object C:/Users/ptheywood/code/flamegpu/FLAMEGPU2/build
  /lib/Release/ensemble.exp
  ensemble.vcxproj -> C:\Users\ptheywood\code\flamegpu\FLAMEGPU2\build\bin\Release\ensemble.exe
  tmpxft_000014ac_00000000-7_main.cudafe1.cpp

Current master produces the .lib still, but places it deeply in the build directory, so this is probably an unwanted change?

     Creating library C:/Users/ptheywood/code/flamegpu/FLAMEGPU2/build/examples/game_of_life/Release/game_of_life.lib and object C:/Users/ptheywood/code/fl
  amegpu/FLAMEGPU2/build/examples/game_of_life/Release/game_of_life.exp

On windows previsusly the values of CMAKE_ARCHIVE_OUTPUT_DIRECTORY and LIBRARY were unset, while binary was being manually set. Per target properties are inheritted from this manual setting.

Maybe we should be setting per target ourselves, depending on the type of target?

This should resovle #601, but standalone repos and the visualisation may also benefit from being updated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants