Skip to content

Instantly share code, notes, and snippets.

@maedoc
Created May 31, 2022 11:53
Show Gist options
  • Save maedoc/4308ae427d80e30dc7718056917098b0 to your computer and use it in GitHub Desktop.
Save maedoc/4308ae427d80e30dc7718056917098b0 to your computer and use it in GitHub Desktop.
A ycm file for Stan work
import os.path
def Settings(*args, **kwargs):
stan_cmd = '-std=c++1y -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT -Wno-ignored-attributes -I stan/lib/stan_math/lib/tbb_2020.3/include -O3 -I src -I stan/src -I lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.9 -I stan/lib/stan_math/lib/boost_1.75.0 -I stan/lib/stan_math/lib/sundials_5.7.0/include -DBOOST_DISABLE_ASSERTS -c -include-pch stan/src/stan/model/model_header.hpp.gch -x c++ -o examples/bernoulli/bernoulli.o examples/bernoulli/bernoulli.hpp'
home = os.environ['HOME']
stan_cmd = stan_cmd.replace('-I stan/', f'-I {home}/.cmdstan/cmdstan-2.28.2/stan/')
flags = [_ for _ in stan_cmd.split(' ') if _.strip()]
return {'flags': flags}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment