-1

I have been trying to run this code from a Github Repository https://github.com/dllu/puppup using CMake. After successfully building the file, The command

  ./puppup

Results in the following error

'.' is not recognized as an internal or external command, operable program or batch file. 

Following is the code for the corresponding CMakeList.txt file

cmake_minimum_required(VERSION 3.9)
project(puppup)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")

set(SCRABBLE_INCLUDE_DIRS
    ${PROJECT_SOURCE_DIR}/src
    ${PROJECT_SOURCE_DIR}/third-party
    )

################################################################

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_FLAGS         "${CMAKE_CXX_FLAGS} -std=c++14 -march=native -Wall -Wpedantic -Werror")
set(CMAKE_CXX_FLAGS_DEBUG   "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Ofast")
set(LLVM_OPT_IR_FLAGS "-inline-threshold=10000")


################################################################

include_directories(${SCRABBLE_INCLUDE_DIRS})

add_executable(
    puppup
    src/main.cpp
    src/movegen.cpp
    )

Thanks in advance!

  • If running `./puppup` result in the error about `.`(dot), then the problem is definitely about your **environment** (broken PATH variable, broken shell settings, etc.) not about the CMake project. – Tsyvarev Mar 06 '21 at 22:43

1 Answers1

0

If you are able to configure/build your project.

I have been trying to run this code from a Github Repository https://github.com /dllu/puppup using CMake. After successfully building the file, The command

Then this isn't cmake's issue anymore. I downloaded the project and successfully built it.

Here is most likely the answer to your question: '' is not recognized as an internal or external command, operable program or batch file

  • Hi, thank you for the quick response. Yes I am able to build/configure the file. Running the make command gives the following output on terminal. -- Configuring done -- Generating done -- Build files have been written to: C:/Users/cjsud/Desktop/puppup-master. I will check the link you have provided. Thank you so much! – Anthony Martial Mar 06 '21 at 20:17
  • Went through the link you provided, but I am not exactly sure where does the '.' belong to. The path the solution talks about, what is it referring to? The path of the Code from Github or the GCC compiler? – Anthony Martial Mar 06 '21 at 20:23
  • Where is the executable generated? cd into that directory and run the command. And you should be good. –  Mar 06 '21 at 20:24
  • I am new to CMake and not exactly sure what the Executable is in this case, I did try adding the path to the env variables, but it did not work unfortunately. Anyway really appreciate the quick help :D – Anthony Martial Mar 06 '21 at 20:44