Comments (20)
I love this library because it provides cancel-able, detachable, and split-able futures. But if Qt and boost are now required dependencies, I am afraid I cannot use it anymore and there are no alternatives :( Very sad.
from libraries.
The requirements have not changed. Boost is required if you are building the tests (which use boost test) or if you require boost optional/variant (because you don't have C++17). QT is optional if you are trying to use the QT schedulers.
cmake
is only being used to generate the config.hpp if you are not building tests file (you can also provide one manually). What is your cmake
command? To test I just uninstalled boost and tried this:
cmake -S . -B ../builds/noboost -DCMAKE_CXX_STANDARD=17 -DBUILD_TESTING=OFF
And it worked fine.
from libraries.
Hi @sean-parent thank you for looking into this.
I can build the lib appart and it works if BUILD_TESTING=OFF
, but in my project I am using the lib with add_subdirectory(3rdparty/stlab)
and I donΒ΄t want to set BUILD_TESTING=OFF for the whole project. Is there a way to disable tests only for stlab? something like STLAB_BUILD_TESTING=OFF
?
from libraries.
Even with BUILD_TESTING=OFF
it does not work with add_subdirectory(3rdparty/stlab)
[cmake] CMake Error: File /xxx/stlab/config.hpp.in does not exist.
[cmake] CMake Error at 3rdparty/stlab/cmake/StlabUtil.cmake:203 (configure_file):
[cmake] configure_file Problem configuring file
[cmake] Call Stack (most recent call first):
[cmake] 3rdparty/stlab/stlab/CMakeLists.txt:44 (stlab_generate_config_file)
It works out of the box with 1.6.2
from libraries.
Special treatment for add_subdirectory
was present in 1.6.2's CMakeLists.txt
Line 32 in 0a7232a
But it was removed in 1.7.1
Maybe it is related.
from libraries.
@camio Issue may be fixed by recent PR? Can you take a look?
from libraries.
Issue is present in main branch
from libraries.
Oh something was merged some minutes ago. I will retry.
from libraries.
Ok 9a75c3d fixed the build.
Thank you @laserallan @camio
BUILD_TESTING=OFF
is still required to avoid boost, the former option to disable tests was definitively removed. so basically now it is all or nothing.
Another strange thing is this error on program termination (in 1.7.1 not present in 1.6.2):
libc++abi: terminating
Aborted (core dumped)
from libraries.
The termination exception is from priority_task_system destructor:
~priority_task_system() {
assert(_q.empty() && "stlab: Thread pool not joined prior to destruction.");
}
Is there any lifecycle management required in 1.7.1 that was not required in 1.6.2?
from libraries.
Termination exception solved by calling stlab::pre_exit();
before returning from main. I am sorry, it was clearly specified in CHANGES.md π€¦πΌββοΈ
from libraries.
Is there a way to disable tests only for stlab?
Setting BUILD_TESTING=OFF
before calling add_subdirectory
should work I believe.
from libraries.
BUILD_TESTING=OFF affects other subprojects. I only want to disable tests of stlab to avoid boost dependency.
A possible solution: #509 ?
from libraries.
See the set documentation. As long as the variable isn't a CACHE variable, which it shouldn't be, then set
will apply only to the current directory scope and not impact other parts of your project.
So if you keep your stuff in 3rdparty
, 3rdparty/CMakeLists.txt
would look like this:
set(BUILD_TESTING OFF)
add_subdirectory(stlab)
# ...
from libraries.
# set(BUILD_TESTING OFF) <--- affects all below
add_subdirectory(3rdparty/stlab)
add_subdirectory(3rdparty/imgui)
add_subdirectory(3rdparty/sqlite3)
add_subdirectory(3rdparty/nlohmann/json)
add_subdirectory(3rdparty/stb)
add_subdirectory(3rdparty/rapidxml_ns)
add_subdirectory(3rdparty/tigl-partial)
What you are proposing is something like this?:
set(BUILD_TESTING OFF)
add_subdirectory(3rdparty/stlab)
set(BUILD_TESTING ON)
add_subdirectory(3rdparty/imgui)
add_subdirectory(3rdparty/sqlite3)
add_subdirectory(3rdparty/nlohmann/json)
add_subdirectory(3rdparty/stb)
add_subdirectory(3rdparty/rapidxml_ns)
add_subdirectory(3rdparty/tigl-partial)
from libraries.
I was assuming you don't want to enable testing for any of your 3rdparty libraries. If you only want to disable it for stlab then your second snippet looks right.
from libraries.
Those are only part of the 3rdparty submodules, others are own projects but included as 3rdparty in this specific project and some of them need to run tests that depend on config.
I will try the second snipped. Thank your for the info.
from libraries.
@camio It worked. Thank you, I am sorry for all the noise.
For reference:
set(GLOBAL_BUILD_TESTING ${BUILD_TESTING})
set(BUILD_TESTING OFF)
add_subdirectory(3rdparty/stlab)
set(BUILD_TESTING ${GLOBAL_BUILD_TESTING})
unset(GLOBAL_BUILD_TESTING)
from libraries.
FWIW I think that can be simplified to this:
block()
set(BUILD_TESTING OFF)
add_subdirectory(3rdparty/stlab)
endblock()
from libraries.
block() looks good, but it requires cmake 3.25.
from libraries.
Related Issues (20)
- Create unit tests for main executors
- Identify and fix any future reduction w/ noncopyable types issues.
- Version in CMakeLists.txt is not correct
- Some files are missing in ./stlab/CMakeLists.txt HOT 1
- Build Error for Portable Executor for c++14 HOT 1
- Executor of packaged_task not used in reduction HOT 7
- Extra Copy of Object in Future Somewhere
- wasm main executor object not defined
- Is documentation generation broken? HOT 12
- No build output HOT 2
- Generated config.hpp Disables Ability to Use Same Source For Multiple Platforms HOT 1
- main_executor_type lost in main_executor.hpp for EMSCRIPTEN HOT 1
- Problem with main_executor for Qt on application exit HOT 3
- WASM main_executor improvements
- Broken compatibility with Qt5 HOT 1
- Handling more then one priority_task_system instance HOT 6
- stlab documentation, best practice and performance HOT 3
- Express the type of `promise` HOT 3
- windows default executor is not exception safe.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libraries.