Comments (6)
the issue is for CMake cuda targets (created via macros in FindCUDA), you can't add any additional flags after the targets are created.
The work around is to add the defines to global flags CMAKE_CXX_FLAGS
before blt_add_library
and then restore the old flags after
This is actually a compelling case for adding an optional DEFINES arg to blt_add_library
We can't use blt_register_library
to solve this b/c these flags are needed to compile the lib. (And in this case the aren't needed by client code)
from blt.
blt_register_library
has additional arguments to add flags and defines to a library target.
I am not entirely sure how blt_register_library
works when the library is generated with blt_add_library
through. @white238, can you please clarify?
from blt.
To be clear, this works correctly without cuda.
from blt.
Update: setting CMAKE_CXX_FLAGS
doesn't work w/ BLT's current cuda support. The only path I found was to add the defs to global CUDA_NVCC_FLAGS
(along with keeping old and restoring them after adding the lib)
@mclarsen and I were able to modify CMAKE_CXX_FLAGS
before, however we were using cuda_wrap_srcs
, not cuda_add_library
, which BLT is currently using
from blt.
Bit by this again in another project.
from blt.
FYI: @mclarsen There is work to pivot to CMake's native cuda support: #154
from blt.
Related Issues (20)
- Internal test checking for c++1X but not c++2X
- Add new Quartz host-configs for gcc and clang
- blt_add_benchmark should take CONFIGURATIONS and OMP_NUM_THREADS arguments HOT 4
- BLT v0.5.3 has some build errors related to googletest HOT 7
- Create tutorial for static analysis and friends
- Modify behavior of `blt_list_append` ?
- CMake Install Logic Checklist
- bug: setting ENABLE_CLANG_CUDA and BLT_CXX_STD=c++17 causes error
- Missing case in `blt_patch_target` and `blt_determine_scope`
- C test enabled without checking if C is an enabled language
- Compiler error with gcc+hip
- Override system include flag when necessary
- Add support for `fpreffity` fortran formatter
- `blt_check_code_compiles`: Work around `try_compile` not working with ALIAS targets
- google test finds python undermining ability to find python you want HOT 3
- Use of ALIAS target magic requires newish cmake
- blt cuda setup issue with newer cmake? HOT 7
- add target_compile_features option / plumbing to blt_add_library
- incrementally add sources + headers to lib using blt
- blt_add_yapf_target requires a SRC_FILES parameter HOT 4
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 blt.