floooh / oryol-samples

Oryol extension module samples
MIT License
82 stars 16 forks source link

No project() command is present. The top-level CMakeLists.txt file must #19

Closed ghost closed 3 years ago

ghost commented 3 years ago

This two errors may be related. Also, how do I change the build type from debug to Release? --config Release did nit work or I may be using it incorrectly.

=== dependency: 'oryol-animation':
Cloning into 'oryol-animation'...
remote: Enumerating objects: 87, done.
remote: Counting objects: 100% (87/87), done.
remote: Compressing objects: 100% (48/48), done.
remote: Total 87 (delta 40), reused 68 (delta 37), pack-reused 0
Unpacking objects: 100% (87/87), done.
=== building: win64-vstudio-debug
=== generating: win64-vstudio-debug
config file: f:/Dropbox/Tech/production/ppc/fips/configs/win64-vstudio-debug.yml
cmake -A "x64" -DCMAKE_BUILD_TYPE=Debug -DFIPS_CONFIG=win64-vstudio-debug -DFIPS_USE_CCACHE=OFF -DFIPS_AUTO_IMPORT=ON -Bf:/Dropbox/Tech/production/ppc/fips-build/oryol-samples/win64-vstudio-debug -Hf:/Dropbox/Tech/production/ppc/oryol-samples
-- Building for: Visual Studio 16 2019
CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as

    project(ProjectName)

  near the top of the file, but after cmake_minimum_required().

  CMake is pretending there is a "project(Project)" command on the first
  line.
This warning is for project developers.  Use -Wno-dev to suppress it.
=== fips_setup(PROJECT oryol-samples)
CMAKE_BUILD_TYPE: Debug
FIPS_ROOT_DIR: F:/Dropbox/Tech/production/ppc/fips
FIPS_PROJECT_DIR: F:/Dropbox/Tech/production/ppc/oryol-samples
FIPS_BUILD_DIR: F:/Dropbox/Tech/production/ppc/fips-build
FIPS_DEPLOY_DIR: F:/Dropbox/Tech/production/ppc/fips-deploy
FIPS_PROJECT_NAME: oryol-samples
FIPS_AUTO_IMPORT: ON
FIPS_CONFIG: win64-vstudio-debug
FIPS_PROJECT_BUILD_DIR: F:/Dropbox/Tech/production/ppc/fips-build/oryol-samples/win64-vstudio-debug
FIPS_PROJECT_DEPLOY_DIR: F:/Dropbox/Tech/production/ppc/fips-deploy/oryol-samples/win64-vstudio-debug
Host system: Windows
CMAKE_CXX_COMPILER_ID: MSVC
Detected C++ Compiler: VStudio (FIPS_MSVC)
FIPS_PLATFORM: WIN64
FIPS_PLATFORM_NAME: win64
CMake Error at F:/Dropbox/Tech/production/ppc/oryol-animation/src/Anim/CMakeLists.txt:16 (oryol_begin_unittest):
  Unknown CMake command "oryol_begin_unittest".

-- Configuring incomplete, errors occurred!
See also "F:/Dropbox/Tech/production/ppc/fips-build/oryol-samples/win64-vstudio-debug/CMakeFiles/CMakeOutput.log".
[ERROR] Failed to generate 'win64-vstudio-debug' of project 'oryol-samples'

Thanks

floooh commented 3 years ago

The "no project() command" is just a warning, this was a change in a (somewhat) recent cmake version for toplevel CMakeLists.txt files where a project() command must exist right after cmake_minimum_required(), I changed this in some projects, but not all (e.g. here: https://github.com/floooh/sokol-samples/blob/master/CMakeLists.txt).

But this is just a warning, the error is something different, there's a cmake macro called oryol_begin_unittes which apparently can't be found, this is defined here:

https://github.com/floooh/oryol/blob/15de929fd8ec5c75c0742ae92a3ff865003f2239/fips-files/include.cmake#L214-L266

...and this was moved there beginning of last year because I removed the integrated unit testing support in fips and moved this into projects.

Is your Oryol checkout on the master branch and uptodate? Because I can't reproduce the problem on a fresh checkout (at least the samples using the oryol-animation module work, I'm seeing a compilation error in Bullet with the latest Apple clang version though, but that's unrelated to the problem you're seeing).

ghost commented 3 years ago

Thanks for the response. I don't even have Oryol, it was downloaded as a dependency when building the samples. This is what U did, there is an error which I missed before:

f:\Dropbox\Tech\production\ppc>git clone https://github.com/floooh/oryol-samples
Cloning into 'oryol-samples'...
remote: Enumerating objects: 27, done.
remote: Counting objects: 100% (27/27), done.
remote: Compressing objects: 100% (18/18), done.
remote: Total 3600 (delta 9), reused 23 (delta 9), pack-reused 3573
Receiving objects: 100% (3600/3600), 87.65 MiB | 4.94 MiB/s, done.
Resolving deltas: 100% (2571/2571), done.
Checking out files: 100% (421/421), done.

f:\Dropbox\Tech\production\ppc>cd oryol-samples

f:\Dropbox\Tech\production\ppc\oryol-samples>fips set config win64-vstudio-release
=== cloning fips build system to 'f:\Dropbox\Tech\production\ppc/fips':
Cloning into 'f:\Dropbox\Tech\production\ppc/fips'...
remote: Enumerating objects: 32, done.
remote: Counting objects: 100% (32/32), done.
remote: Compressing objects: 100% (25/25), done.
remote: Total 4864 (delta 15), reused 18 (delta 7), pack-reused 4832
Receiving objects: 100% (4864/4864), 2.31 MiB | 1.39 MiB/s, done.
Resolving deltas: 100% (3320/3320), done.
'config' set to 'win64-vstudio-release' in project 'oryol-samples'
f:\Dropbox\Tech\production\ppc\oryol-samples>fips build
=== dependency: 'oryol':
Cloning into 'oryol'...
remote: Enumerating objects: 772, done.
remote: Counting objects: 100% (772/772), done.
remote: Compressing objects: 100% (682/682), done.
remote: Total 772 (delta 137), reused 294 (delta 81), pack-reused 0 eceiving objects:  95% (734/772), 20.86 MiB | 4.04 MiB/s
Receiving objects: 100% (772/772), 22.83 MiB | 3.71 MiB/s, done.
Resolving deltas: 100% (137/137), done.
Checking out files: 100% (585/585), done.

10 minutes later ... 

image

floooh commented 3 years ago

Yeah up until this point it works as expected (oryol is pulled in by fips as dependency), but those errors are basically bit-rot (python2 vs python3 compatibility problems, and the turbobadger looks like that Visual Studio (I guess) accepted the GCC pragma in older versions but now warns about it, or maybe I changed the default warning settings in fips in the meantime).