Skip to content
New issue

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

🎉 Added cmake buildsystem #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AnotherFoxGuy
Copy link

No description provided.

@AnotherFoxGuy AnotherFoxGuy force-pushed the cmake branch 7 times, most recently from 596ad25 to 6a74b6b Compare September 8, 2022 11:03
@ohlidalp
Copy link
Owner

It's not working well for me. I ran conan install manually and FindAngelscript.cmake was generated, but cmake still complains it wasn't provided.

CMake Error at CMakeLists.txt:24 (find_package):
  By not providing "FindAngelscript.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "Angelscript", but CMake did not find one.

  Could not find a package configuration file provided by "Angelscript" with
  any of the following names:

    AngelscriptConfig.cmake
    angelscript-config.cmake

Attached is my build script + full console output.
cmake logs.zip

@ohlidalp
Copy link
Owner

ohlidalp commented Dec 21, 2022

It's working now but I need edits:

  • Remove the catch2 tests and start a separate PR on it, when the cmake is merged. One thing at a time. I'm not going to learn a new test framework right now nor merge something I can't control, no offense.
  • Clean up the cruft from .gitignore, most of it is irrelevant here or makes no sense since this cmake is made for out-of-source build.

@ohlidalp
Copy link
Owner

ohlidalp commented Dec 22, 2022

I overwrote the .gitignore - let me know if you see anything wrong with it.

I'd like to understand why the cmake forces me to pass CMAKE_BUILD_TYPE on commandline:

c:\Users\Petr\source\RefCountingObject-AngelScript\Testbed>conan install .
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=Visual Studio
compiler.runtime=MD
compiler.version=17
os=Windows
os_build=Windows
[options]
[build_requires]
[env]

conanfile.txt: Installing package
Requirements
    angelscript/2.35.1 from 'conancenter' - Cache
Packages
    angelscript/2.35.1:5a61a86bb3e07ce4262c80e1510f9c05e9b6d48b - Cache

Installing (downloading, building) binaries...
angelscript/2.35.1: Already installed!
conanfile.txt: Generator txt created conanbuildinfo.txt
conanfile.txt: Generator cmake_find_package created FindAngelscript.cmake
conanfile.txt: Aggregating env generators
conanfile.txt: Generated conaninfo.txt
conanfile.txt: Generated graphinfo

c:\Users\Petr\source\RefCountingObject-AngelScript\Testbed>cmake -b ~/builds/refcountingobject-cmake-cli
CMake Error: Unknown argument -b
CMake Error: Run 'cmake --help' for all supported options.

c:\Users\Petr\source\RefCountingObject-AngelScript\Testbed>cmake -S . -B ~/builds/refcountingobject-cmake-cli
-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19044.
-- The C compiler identification is MSVC 19.32.31332.0
-- The CXX compiler identification is MSVC 19.32.31332.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.32.31326/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.32.31326/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Downloading conan.cmake from https://github.com/conan-io/cmake-conan
CMake Error at C:/Users/Petr/builds/refcountingobject-cmake-cli/conan.cmake:73 (message):
  Please specify in command line CMAKE_BUILD_TYPE
  (-DCMAKE_BUILD_TYPE=Release)
Call Stack (most recent call first):
  C:/Users/Petr/builds/refcountingobject-cmake-cli/conan.cmake:444 (_conan_detect_build_type)
  CMakeLists.txt:22 (conan_cmake_autodetect)


-- Configuring incomplete, errors occurred!
See also "C:/Users/Petr/builds/refcountingobject-cmake-cli/CMakeFiles/CMakeOutput.log".

c:\Users\Petr\source\RefCountingObject-AngelScript\Testbed>

Same thing when I manually instruct Conan to build Debug and Release.

After adding -DCMAKE_BUILD_TYPE=Release it configures fine. The generated VisualStudio solution contains "Debug" anyway but naturally it yields "mismatch detected" linking errors.

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