We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
as the title says, the build process fails if either flags are included in my CMAKE_CXX_FLAGS. I've provided a replication of the error:
CMAKE_CXX_FLAGS
error:
CMake Error at cmake/modules.cmake:135 (add_library): No SOURCES given to target: MODULES Call Stack (most recent call first): CMakeLists.txt:27 (add_module_library)
file structure:
. ├── cmake │ └── modules.cmake ├── CMakeLists.txt └── src ├── hello.cpp ├── main.cpp └── subdir └── bye.cpp
CMakeLists.txt:
cmake_minimum_required(VERSION 3.26) project(modtest) set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) # this works #set(CMAKE_CXX_FLAGS "-w -Wall -Wextra -Werror -Wshadow -Wconversion -Wunused -Wpedantic") # but this doesn't set(CMAKE_CXX_FLAGS "-w -Wall -Wextra -Werror -Wshadow -Wconversion -Wunused -Wpedantic -Wpedantic-errors -Weverything") set(PROJECT "${CMAKE_CURRENT_SOURCE_DIR}") set(TARGET "modtest") file(GLOB_RECURSE SRC "${PROJECT}/src/*.cpp") add_executable(${TARGET} ${PROJECT}/src/main.cpp) include(cmake/modules.cmake) add_module_library(MODULES ${SRC}) target_link_libraries(${TARGET} PRIVATE MODULES)
main:
import hello; import bye; int main() { hello(); bye(); }
hello:
module; #include <iostream> export module hello; export void hello() { std::cout << "hello\n"; }
bye:
module; #include <iostream> export module bye; export void bye() { std::cout << "bye\n"; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
as the title says, the build process fails if either flags are included in my
CMAKE_CXX_FLAGS
. I've provided a replication of the error:error:
file structure:
CMakeLists.txt:
main:
hello:
bye:
The text was updated successfully, but these errors were encountered: